<?php
require_once('../../../../wp-config.php');
if(file_exists(ABSPATH . WPINC . '/rss.php')) :
	require_once (ABSPATH . WPINC . '/rss.php');
endif;

@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));

$url = $_GET['url'];
$num = $_GET['num'];

?>
<ul>
<?php
$rss_cax = @fetch_rss($url);	
if ( isset($rss_cax->items) && 0 != count($rss_cax->items) ) {
	$rss_cax->items = array_slice($rss_cax->items, 0, $num);
	foreach ($rss_cax->items as $item ) {			
		$item_number++;
		echo "<li><a href=\"" . wp_filter_kses($item['link']) . "\">" . wptexturize(wp_specialchars($item['title'])) . "</a></li>";
	}
}
?>
</ul>